package com.product.android.commonInterface.contact;

import java.io.Serializable;

import com.product.android.business.ApplicationVariable;

/**
 * 
 * 
 * <br>Created 2014-5-8 下午7:19:00
 * @version  
 * @author   Administrator		
 *
 * @see
 */
public class RankFilterInfo implements Serializable{

	private static final long serialVersionUID = 5233156540343771586L;
	
	private int unitid ;
	private int departid = 0;
	private String orgSelectName = "";
	private int genderSelect = Gender.ALL;
	private int timeSelect = TimeCondition.ALL;
	
	public RankFilterInfo(){
		if(ApplicationVariable.INSTANCE.getIUser() != null){
		    orgSelectName = ApplicationVariable.INSTANCE.getIUser().getBindUser().getUnitname();
		}else{
			orgSelectName = "全公司";
		}
	}
	
	public class Gender {
		public static final int ALL = 0;
		public static final int MALE = OapUser.MALE;
		public static final int FEMALE = OapUser.FEMALE;
	}
	
	public class TimeCondition {
		public static final int ALL = 0; // 全部
		public static final int LAST_WEEK = 1; // 上周数据
	}
	
	public int getUnitid() {
		return unitid;
	}
	public void setUnitid(int unitid) {
		this.unitid = unitid;
	}
	public int getDepartid() {
		return departid;
	}
	public void setDepartid(int departid) {
		this.departid = departid;
	}
	public String getOrgSelectName() {
		return orgSelectName;
	}
	public void setOrgSelectName(String orgSelectName) {
		this.orgSelectName = orgSelectName;
	}
	public int getGenderSelect() {
		return genderSelect;
	}
	public void setGenderSelect(int genderSelect) {
		this.genderSelect = genderSelect;
	}
	public int getTimeSelect() {
		return timeSelect;
	}
	public void setTimeSelect(int timeSelect) {
		this.timeSelect = timeSelect;
	}
	
	// 是否为默认筛选条件
	public boolean isDefault(){
		
		if(departid == 0 && genderSelect == Gender.ALL && timeSelect == TimeCondition.ALL){
			return true;
		}
		else{
			return false;
		}
	}
}
